package edu.uci.ics.ai.maze.utils;

import java.io.PrintWriter;
import java.io.StringWriter;

public final class Throwables {

  private Throwables() { }

  public static String stackTraceToString(Throwable t) {
    StringWriter writer = new StringWriter();
    PrintWriter pw = new PrintWriter(writer, true);
    t.printStackTrace(pw);
    return writer.toString();
  }

}
